package com.gopay.common.domain.bank;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import com.gopay.common.domain.BaseEntity;

/**
 * 
 * @BankOrder.java
 * @author WangHongFei
 */
@Entity
@Table(name = "BIS_BANK_MAIN_ORDER")
public class BankOrder extends BaseEntity {


	private static final long serialVersionUID = 6462274264709668397L;
	/**
	 * 国付宝系统订单号（系统内唯一订单标识）
	 */
	@Column(name = "GOPAY_ORDER_ID")
	private String orderId;
	/**
	 * 银行订单号
	 */
	@Id
	@Column(name = "GOPAY_OUT_ORDER_ID")
	private String outOrderId;
	/**
	 * 银行代码
	 */
	@Column(name = "GOPAY_BANK_CODE")
	private String bankCode;

	
	/**
	 * 银行业务产品代码BANK_BIZ_PROD_CODE
	 */
	@Column(name = "BANK_BIZ_PROD_CODE")
	private String bankBizProdCode;

	/**
	 * 银行业务产品代码
	 */
	@Column(name = "INTRFACE_CHANNEL_CODE")
	private String interfaceChennelCode;

	/**
	 * 发往银行时间
	 */
	@Column(name = "SEND_BANK_TM")
	private java.util.Date sendBankTm;
	
	/**
     * 是否锁定
     * 
     * 1 - 是 0 - 否
     */
    @Column(name = "IS_LOCK", nullable = false, precision = 1, scale = 0)
    private int lock;
	
	/**
     * 订单类型
     * 00国付宝新平台订单 
     * 01国付宝旧平台订单
	 * 02三方平台国付宝通道订单
	 * 03三方平台独立通道订单
     */
    @Column(name = "ORDER_TYPE")
    private String orderType;

	/**
	 * 订单状态码
	 * 
	 * 
	 * 00- 进行中
	 * 
	 * 02- 银行通知订单成功 03- 定时对单成功 04- 手工对单成功
	 * 
	 * 91- 银行通知订单失败 92- 银行通知验签失败 93- 金额比对异常 94- 作废 95- 超时
	 * 
	 * 99- 其他失败
	 */
	@Column(name = "ORDER_STATUS")
	private java.lang.String orderStatus;

	/**
	 * 银行系统响应码
	 */
	@Column(name="BANK_RESP_CODE")
	private java.lang.String bankRespCode;

	/**
	 * 银行订单流水号
	 */
	@Column(name="BANK_ORDER_ID")
	private java.lang.String bankOrderId;

	/**
	 * 交易处理完成时间，作为收费点依据
	 */
	@Column(name="TRAN_FINISH_TIME")
	private java.util.Date tranFinishTime;

	/**
	 * 对单次数总计
	 */
	@Column(name="TOTAL_CHECK_TIMES")
	private java.lang.Integer totalCheckTimes;
	/**
	 * 最后对单时间
	 */
	@Column(name="LAST_CHECK_BILL_TIME")
	private java.util.Date lastCheckBillTime;

	/**
	 * 乐观锁版本号
	 */
	@Version
	@Column(name="VERSION")
	private java.lang.Integer version;

	/**
	 * 创建时间
	 */
	@Column(name="CREATED_TS")
	private java.util.Date createdTs;

	/**
	 * 记录最后修改时间
	 */
	@Column(name="LAST_UPD_TS")
	private java.util.Date lastUpdTs;

	/**
	 * 最后修改交易码
	 */
	@Column(name="LAST_UPD_TRANCODE")
	private java.lang.String lastUpdTrancode;

	/**
	 * 系统预留字段1
	 */
	@Column(name="REMARK3")
	private java.lang.String remark3;

	/**
	 * 系统预留字段2
	 */
	@Column(name="REMARK2")
	private java.lang.String remark2;


	/**
	 * 是否禁用信用卡(0：否,1：是)
	 */
	@Column(name="DISABLE_CREDIT_CARD")
	private java.lang.String disableCreditCard="0";	
	
    /**
     * 是否为小额风险商户(0：否,1：是)
     */
    @Column(name = "DISABLE_SMALL_MERCHANT")
    private java.lang.String disableSmallMerchant = "0";
    
    /**
     * 是否为特殊大额商户(0：否,1：是)
     */
    @Column(name = "SPECIAL_BIG_MERCHANT")
    private java.lang.String specialBigMerchant = "0";
    
    /**
	 * 前台通知时间
	 */
	@Column(name="FRONT_BACK_TIME")
	private java.util.Date frontBackTime;
	
	/**
     * 原交易银行订单号
     */
    @Column(name="ORI_OUT_ORDER_ID")
    private String oriOutOrderId;

	/**
     * 发起银行金额
     */
    @Column(name="SEND_BANK_AMT")
    private BigDecimal sendBankAmt;
    
    /**
     * 交易批次号
     */
    @Column(name="TRANS_BATCH_NO")
    private String transBatchNo;
    
	/**
     * APP_ID
     */
    @Column(name="APP_ID")
    private String appId;

	/**
	 * 收款银行
	 */
	@Column(name="RECV_BANK")
	private String recvBank;
	
	public int getLock() {
		return lock;
	}

	public void setLock(int lock) {
		this.lock = lock;
	}

	public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getOutOrderId() {
		return outOrderId;
	}

	public void setOutOrderId(String outOrderId) {
		this.outOrderId = outOrderId;
	}

	public String getBankCode() {
		return bankCode;
	}

	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}

	public String getBankBizProdCode() {
		return bankBizProdCode;
	}

	public void setBankBizProdCode(String bankBizProdCode) {
		this.bankBizProdCode = bankBizProdCode;
	}

	public String getInterfaceChennelCode() {
		return interfaceChennelCode;
	}

	public void setInterfaceChennelCode(String interfaceChennelCode) {
		this.interfaceChennelCode = interfaceChennelCode;
	}

	public java.util.Date getSendBankTm() {
		return sendBankTm;
	}

	public void setSendBankTm(java.util.Date sendBankTm) {
		this.sendBankTm = sendBankTm;
	}

	public java.lang.String getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(java.lang.String orderStatus) {
		this.orderStatus = orderStatus;
	}

	public java.lang.String getBankRespCode() {
		return bankRespCode;
	}

	public void setBankRespCode(java.lang.String bankRespCode) {
		this.bankRespCode = bankRespCode;
	}

	public java.lang.String getBankOrderId() {
		return bankOrderId;
	}

	public void setBankOrderId(java.lang.String bankOrderId) {
		this.bankOrderId = bankOrderId;
	}

	public java.util.Date getTranFinishTime() {
		return tranFinishTime;
	}

	public void setTranFinishTime(java.util.Date tranFinishTime) {
		this.tranFinishTime = tranFinishTime;
	}

	public java.lang.Integer getTotalCheckTimes() {
		return totalCheckTimes;
	}

	public void setTotalCheckTimes(java.lang.Integer totalCheckTimes) {
		this.totalCheckTimes = totalCheckTimes;
	}

	public java.util.Date getLastCheckBillTime() {
		return lastCheckBillTime;
	}

	public void setLastCheckBillTime(java.util.Date lastCheckBillTime) {
		this.lastCheckBillTime = lastCheckBillTime;
	}

	public java.lang.Integer getVersion() {
		return version;
	}

	public void setVersion(java.lang.Integer version) {
		this.version = version;
	}

	public java.util.Date getCreatedTs() {
		return createdTs;
	}

	public void setCreatedTs(java.util.Date createdTs) {
		this.createdTs = createdTs;
	}

	public java.util.Date getLastUpdTs() {
		return lastUpdTs;
	}

	public void setLastUpdTs(java.util.Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	public java.lang.String getLastUpdTrancode() {
		return lastUpdTrancode;
	}

	public void setLastUpdTrancode(java.lang.String lastUpdTrancode) {
		this.lastUpdTrancode = lastUpdTrancode;
	}

	public java.lang.String getRemark3() {
		return remark3;
	}

	public void setRemark3(java.lang.String remark3) {
		this.remark3 = remark3;
	}

	public java.lang.String getRemark2() {
		return remark2;
	}

	public void setRemark2(java.lang.String remark2) {
		this.remark2 = remark2;
	}
	

	public java.lang.String getDisableCreditCard() {
		return disableCreditCard;
	}

	public void setDisableCreditCard(java.lang.String disableCreditCard) {
		this.disableCreditCard = disableCreditCard;
	}

    public java.lang.String getDisableSmallMerchant() {
        return disableSmallMerchant;
    }

    public void setDisableSmallMerchant(java.lang.String disableSmallMerchant) {
        this.disableSmallMerchant = disableSmallMerchant;
    }

	public java.util.Date getFrontBackTime() {
		return frontBackTime;
	}

	public void setFrontBackTime(java.util.Date frontBackTime) {
		this.frontBackTime = frontBackTime;
	}

    public String getOriOutOrderId() {
        return oriOutOrderId;
    }

    public BigDecimal getSendBankAmt() {
        return sendBankAmt;
    }

    public void setOriOutOrderId(String oriOutOrderId) {
        this.oriOutOrderId = oriOutOrderId;
    }

    public void setSendBankAmt(BigDecimal sendBankAmt) {
        this.sendBankAmt = sendBankAmt;
    }

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

    public java.lang.String getSpecialBigMerchant() {
        return specialBigMerchant;
    }

    public String getTransBatchNo() {
		return transBatchNo;
	}

	public void setTransBatchNo(String transBatchNo) {
		this.transBatchNo = transBatchNo;
	}

	public void setSpecialBigMerchant(java.lang.String specialBigMerchant) {
        this.specialBigMerchant = specialBigMerchant;
    }
	public String getRecvBank() {
		return recvBank;
	}

	public void setRecvBank(String recvBank) {
		this.recvBank = recvBank;
	}
}
